<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

</head>

<body>
    <div id="app">
        <demo>
            <template v-slot:header>
                <h1>标题</h1>
            </template>
            <template v-slot:content>
                <h1>标题2</h1>
            </template>
            <template v-slot:footer>
                <h1>标题3</h1>
            </template>
        </demo>
    </div>

</body>
<script src="./vue.js"></script>
<script>
    Vue.component('demo', {
        template: `
        <div>
            <slot name="header"></slot>
            <slot name="content"></slot>
            <slot name="footer"></slot>
        </div>
        
        `
    })
    let vm = new Vue({
        el: "#app",
    });
</script>

</html>